package com.hzncc.flowable_diboot.contract.service;

import com.diboot.core.service.BaseService;
import com.hzncc.flowable_diboot.contract.entity.SalesContract;
import com.hzncc.flowable_diboot.contract.entity.SalesContractMrl;
import com.hzncc.flowable_diboot.contract.vo.ContractAuditVO;
import com.hzncc.flowable_diboot.contract.vo.ContractProductListVO;
import com.hzncc.flowable_diboot.contract.vo.SalesContractListVO;
import com.sap.conn.jco.JCoException;

import java.util.List;

/**
 * 销售合同 相关Service接口定义
 *
 * @author MyName
 * @version 1.0
 * @date 2024-09-02
 * Copyright © MyCorp
 */
public interface SalesContractService extends BaseService<SalesContract> {

    String getDeliveryStatusByContractCode(String contractCode);

    String getInvoiceStatusByContractCode(String contractCode);

    void pushSap(String id) throws JCoException;

    void cancelSap(String id) throws JCoException;

    SalesContractListVO getSalesContract(ContractAuditVO contractDetail, ContractProductListVO productListVO);

    void pushSap(SalesContractListVO salesContract) throws JCoException;

    SalesContractListVO getSalesContract(String contractProductId);

    SalesContractListVO getSalesContractFormProject(String contractProductId);

    Boolean checkSap(String id);

    List<SalesContractMrl> checkMrlCanPush(List<SalesContractMrl> mrlList,String salesOrg,String disChannel);

    void batchPushSap(List<String> ids) throws JCoException;

    void updateRelatedField(String id);
}